<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" >
<html lang="en">
<head>
    <meta charset="UTF-8"/>

    <link href="http://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>

<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>书籍列表---------显示所有书籍</small>
                </h1>
            </div>
        </div>

        <div class="row">
            <div class="col-md-4 column">
                <a class="btn btn-primary" href="/addBook">新增书籍</a>
            </div>
            <div class="col-md-8 column">
                <form th:class="form-inline" th:action="@{/queryBook}" method="post" style="float: right">
                    <span th:text="${error}" style="color: red;font-weight: bold"></span>
                    <input th:type="text" name="queryBookName" class="form-control" placeholder="请输入要查询书籍的名称">
                    <input th:type="submit" th:value="查询" class="btn btn-primary">
                </form>
            </div>
        </div>
    </div>

    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-hover table-striped">
                <thead>
                    <th>书籍编号</th>
                    <th>书籍名称</th>
                    <th>书籍数量</th>
                    <th>书籍详情</th>
                    <th>操作</th>
                </thead>

                <tbody>
                <tr th:each="book : ${bookList}">
                    <th scope="row" th:text="${book.bookID}"></th>
                    <td th:text="${book.bookName}"></td>
                    <td th:text="${book.bookCounts}"></td>
                    <td th:text="${book.detail}"></td>
                    <td>
                        <a th:href="@{/toUpdate(id=${book.bookID})}">修改</a>
                        &nbsp; | &nbsp;
                        <a th:href="@{/toDelete(id=${book.bookID})}">删除</a>
                    </td>
                </tr>
                </tbody>
            </table>

        </div>
    </div>
</div>



</body>
</html>